--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
android/README.md 2db12e0bde7ecc92688a8cc2e37ff71bab4d290f (2db12e0b) Text, 2.24 KB
Tc9d1d9# MeshChatX Android App
This directory contains the Android app build configuration using Chaquopy to embed the Python MeshChatX server.
Tc9d1d9## Architecture
The app uses a **WebView** to display the existing Vue.js frontend. The Python server runs in the background via Chaquopy and serves the web interface on Ta5d6ff`http://127.0.0.1:8000`.
**No Kotlin frontend needed** - we reuse the entire existing Vue.js web frontend!
Tc9d1d9## Prerequisites
Tff7b72- Android Studio (latest version)
Tff7b72- Android SDK with API level 24+ (Android 7.0+)
Tff7b72- Chaquopy license (free for open source projects, see https://chaquo.com/chaquopy/pricing/)
Tc9d1d9## Setup
Tff7b721. **Initialize Gradle Wrapper** (if not already done):
Ta5d6ff ```Ta5d6ffbash
task android-init
Ta5d6ff ```
Or manually:
Ta5d6ff ```Ta5d6ffbash
Tffa657cd android
gradle wrapper --gradle-version T79c0ff8.2
Ta5d6ff ```
Tff7b722. **Get Chaquopy License**:
Tff7b72- Sign up at https://chaquo.com/chaquopy/
Tff7b72- Add your license key to Ta5d6ff`android/local.properties`:
Ta5d6ff ```
chaquopy.license=your-license-key-here
```
Tff7b723. **Prepare Build**:
Ta5d6ff ```Ta5d6ffbash
task android-prepare
Ta5d6ff ```
This will:
Tff7b72- Build the frontend
Tff7b72- Copy the Ta5d6ff`meshchatx` package to Ta5d6ff`app/src/main/python/`
Tff7b72- Initialize Gradle wrapper if needed
Tc9d1d9## Building
Tc9d1d9### Using Task (Recommended)
Ta5d6ff```Ta5d6ffbash
T8b949e# Build debug APK
task android-build
T8b949e# Build release APK (requires signing config)
task android-build-release
Ta5d6ff```
Tc9d1d9### Using Gradle Directly
Ta5d6ff```Ta5d6ffbash
Tffa657cd android
./gradlew assembleDebug
Ta5d6ff```
Or open the Ta5d6ff`android` directory in Android Studio and build from there.
Tc9d1d9## Configuration
The server is configured to:
Tff7b72- Run on Ta5d6ff`127.0.0.1:8000` (localhost only)
Tff7b72- Use HTTPS for local WebView access
Tff7b72- Run in headless mode (no browser launch)
Tc9d1d9## Notes
Tff7b72- The app requires network permissions for RNS/mesh networking
Tff7b72- Storage permissions are needed for identity and message storage
Tff7b72- The Python server runs in a background thread
Tff7b72- The WebView loads the Vue.js frontend after a 2-second delay to allow server startup
Tc9d1d9## Troubleshooting
Tff7b72- If the WebView shows a blank page, check logcat for Python errors
Tff7b72- Ensure all Python dependencies are listed in Ta5d6ff`app/build.gradle` chaquopy.pip block
Tff7b72- Some native dependencies (like RNS) may need additional configuration
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────